package com.slz3.business.module.drawManagement.draUserNumber.steward;

import com.slz3.business.module.drawManagement.draUserNumber.domain.DraUserNumber;
import com.slz3.business.module.drawManagement.draUserNumber.domain.DraUserNumberCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class DraUserNumberResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(DraUserNumber.class).flatMap(draUserNumber ->
                DraUserNumberResController.add(req, draUserNumber)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.delete(req, draUserNumberCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(DraUserNumber.class).flatMap(draUserNumber ->
                DraUserNumberResController.modify(req, draUserNumber)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return DraUserNumberResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return DraUserNumberResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return DraUserNumberResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.auditSubmit(req, draUserNumberCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.audit(req, draUserNumberCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.auditReject(req, draUserNumberCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.usingEnable(req, draUserNumberCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(DraUserNumberCondition.class).flatMap(draUserNumberCondition ->
                DraUserNumberResController.usingDisable(req, draUserNumberCondition)
        );
    }   

}
